using Microsoft.Extensions.Logging;
using Quartz;

namespace Bean.PolicyBackend.Handler;

[DisallowConcurrentExecution]
public class TestJob : IJob
{
    private readonly ILogger<TestJob> _logger;

    /// <summary>
    /// 
    /// </summary>
    /// <param name="logger"></param>
    public TestJob(ILogger<TestJob> logger)
    {
        _logger = logger;
    }

    /// <summary>
    /// 执行逻辑
    /// </summary>
    /// <param name="context"></param>
    /// <returns></returns>
    /// <exception cref="NotImplementedException"></exception>
    public Task Execute(IJobExecutionContext context)
    {
        Console.WriteLine("TestJob executed");
        // throw new NotImplementedException();
        return Task.CompletedTask;
    }
}